/**
 * Created by oiuyt on 2018/7/18.
 */
import React, { Component } from 'react';
import asyncComponent from '../../utils/asyncComponent'
import { Layout } from 'antd';
import {
    Route,
    Redirect
} from 'react-router-dom'

const authorList = asyncComponent(() => import("../author/list"))
const news = asyncComponent(() => import("../news/blankList"))
const newsClassList = asyncComponent(() => import("../newsClass/list"))
const test8 = asyncComponent(() => import("../main/test8"))
const test10 = asyncComponent(() => import("../main/test10"))

const test11 = asyncComponent(() => import("../main/test11"))
const test12 = asyncComponent(() => import("../main/test12"))
const test13 = asyncComponent(() => import("../main/test13"))
const test14 = asyncComponent(() => import("../main/test14"))
const { Content } = Layout;
class MainContent extends Component {
        //constructor(props) {
        //        super(props);
        //        //console.log(props)
        //}
        render() {
                return (
                    <Content style={{margin: '24px 16px', padding: 24, background: '#fff', minHeight: 280,}}>
                            <Route path={`${this.props.match.url}/`} exact render={()=> ( <Redirect to={`${this.props.match.url}/authorList`}/>)}/>
                            <Route path={`${this.props.match.url}/authorList`}   component={authorList}/>
                            <Route path={`${this.props.match.url}/newsClassList`}   component={newsClassList}/>
                            <Route path={`${this.props.match.url}/news`}   component={news}/>
                            <Route path={`${this.props.match.url}/test8`}  component={test8}/>
                            <Route path={`${this.props.match.url}/test10`}  component={test10}/>
                            <Route path={`${this.props.match.url}/test11`}  component={test11}/>
                            <Route path={`${this.props.match.url}/test12`}  component={test12}/>
                            <Route path={`${this.props.match.url}/test13`}  component={test13}/>
                            <Route path={`${this.props.match.url}/test14`}  component={test14}/>
                    </Content>
                );
        }
}
export default MainContent